package org.han.org.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.han.base.domain.BaseDomain;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Department extends BaseDomain {

  @ApiModelProperty("部门名")
  private String name;
  @ApiModelProperty("介绍")
  private String intro;
  @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
  private Date create_time;
  @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
  private Date update_time;
  @ApiModelProperty("部门经理id")
  private Long manager_id;
  @ApiModelProperty("父部门id")
  private Long parent_id;
  @ApiModelProperty("路径")
  private String path;
  @ApiModelProperty("状态")
  private Long state;
  // 部门经理  多对一的关系
  private Employee manager;
  // 父部门  多对一的关系
  private Department parent;

  // 子部门
  private List<Department> children;



}
